]> dgit.raspbian.org Git - vtk9.git/commit
Fix segfault writing ascii .vtu files with implicit cell type arrays
authorAnton Gladky <gladk@debian.org>
Sat, 12 Sep 2026 13:35:02 +0000 (09:35 -0400)
committerDominique Belhachemi <domibel@debian.org>
Sat, 12 Sep 2026 13:35:02 +0000 (09:35 -0400)
commit833dd6897aa376dc20ab2e98eb6fb1bc619a7347
treea632a45db915670ebc6ce51ca68734c7a008190d
parent620af446d81ff2ab8a1fe345f460958c10a7f491
Fix segfault writing ascii .vtu files with implicit cell type arrays

Forwarded: not-yet

NewIterator() returns nullptr for the implicit cell-type arrays used
since VTK 9.6, so WriteAsciiData() dereferenced that nullptr in
iter->Delete(). Merely guarding the Delete() is not enough: the
templated writer already returns early on a null iterator, so the array
is then written empty, and since WriteInlineData() discards the return
value the writer reports success for a file which has lost all of its
cells. Write such arrays through an explicit copy instead.
Closes yade FTBFS.

Gbp-Pq: Name fix_xmlwriter_ascii_implicit_cellarray_segfault.patch
IO/XML/vtkXMLWriter.cxx